<extend name="common:commonSimpleNewTemplate" />
<block name="main_content">
<div id="">
<!-- 	<style>
		.addressSelect{
			color: #000;
		    float: right;
		    font-size: 20px;
		    font-weight: bold;
		    line-height: 20px;
		    opacity: 0.2;
		    text-shadow: 0 1px 0 #fff;
		}
		.alert .addressSelect{
			line-height: 20px;
		    position: relative;
		    right: -21px;
		    top: -2px;
		}
	</style> -->
	<div class="container-fluid" id="biz_dealer">
		<div class="row-fluid">
			<div class="span12">
				<div class="widget-box">
					<div class="widget-title">
						<span class="icon"> <i class="icon-info-sign"></i>
						</span>
						<h5>经销商信息</h5>
					</div>
					<div class="widget-content nopadding" >
         				 <div class="widget-content nopadding">
           					 <table id="search_result" page_index="1" class="table table-bordered table-striped">
             					 <thead>
                					<tr>
                					  <th>选择</th>
                					  <th>经销商编号</th>
                 					  <th>经销商姓名</th>
                   					  <th>经销商类型</th>
                  					  <th>经销商默认返点</th>
                  					  <th>业务对接人</th>
                  					  <th>业务对接人电话</th>
                  					  <th>大区</th>
                  					  <th>省名称</th>
                  					  <th>法人代表</th>
                                    </tr>
                                  </thead>
                                <tbody>
                			<if condition="empty($lst_dealer_info)">
								<td colspan="3">暂时没有数据</td>
								<else /> <volist name="lst_dealer_info" id="deler_info"
									empty="暂时没有数据">
								<tr>
								    <td> <input class='input_check_box' name='checkOneBox' deler_id='{$deler_info.dealer_id}' type='radio' style='position:relative;width: 50px; opacity: 100;'></td>
									<td>{$deler_info.dealer_id}</td>
									<td>{$deler_info.dealer_name}</td>
	<!-- 								<td>{$deler_info.dealer_type}</td>
									<td>{$deler_info.discount_rate}</td>
									<td>{$deler_info.business_leader}</td>
									<td>{$deler_info.business_leader_cellphone}</td>
									<td>{$deler_info.area_name}</td>
									<td>{$deler_info.province_name}</td>
									<td>{$deler_info.leal_person}</td> -->
								</tr>
								</volist> </if>
                               </tbody>
                            </table>
                    </div>
                    <if condition="!empty($lst_dealer_info)">
                     <button id='check_this_dealer' class="btn btn-success" type="submit">确认经销商</button>
                     </if>
					</div>
				</div>
			</div>
		</div>
</div>
</div>
</block>

<block name="js_content">
<script>

DealerSearchPage = {
		'BindEvent': function(){
			
			$('#check_this_dealer').bind('click',function(){
				var deler_id = '';
				$('input[name="checkOneBox"]:checked').each(function(){ 
					deler_id=$(this).attr('deler_id'); 
				}); 
				
				if(deler_id ==''){
					alert('请选择经销商信息');
					return;
				}
				parent.DealerInfoPage.BuildPage(deler_id);
				
				var index = parent.layer.getFrameIndex(window.name); //获取当前窗体索引
			    parent.layer.close(index); //执行关闭
				
			});
			
		},
		'SearchDealer':function(){
			
		}  
};


$(document).ready(function(){
	DealerSearchPage.BindEvent();
});

</script>
</block>